import 'package:flutter/material.dart';

import '../../common/my_icon.dart';
import '../../utils/screenutil/fit.dart';

class Empty extends StatelessWidget {
  String tip;
  double size;
  double paddingVertical;

  Empty({tip, size = 120, paddingVertical = 50})
      : this.tip = tip ?? "没有找到需要展示数据",
        this.paddingVertical = paddingVertical.toDouble(),
        this.size = size.toDouble();

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(vertical: fit(paddingVertical)),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Icon(
            MyIcon.empty,
            size: fit(size),
            color: Colors.black26,
          ),
          SizedBox(height: 20.f),
          Text(
            "$tip",
            style: TextStyle(color: Colors.black26, fontSize: 24.f),
          ),
        ],
      ),
    );
  }
}
